module.exports = {
    env: {
      node: true,
      mocha: true,
      es2021: true,
    },
    parserOptions: {
      ecmaVersion: "latest",
      sourceType: "module",
      ecmaFeatures: {
        jsx: true
      },
    },
    "plugins": ["@typescript-eslint"],
    parser: "@typescript-eslint/parser",
    "extends": ["plugin:@typescript-eslint/recommended"],
    globals: {
      _: true,
      errors: true,
      dayjs: true,
    },
    // 'extends': 'eslint:recommended',
    rules: {
      // possible errors
      "no-console": ["warn"],
      // best practices
      "array-callback-return": ["warn"],
      "block-scoped-var": ["warn"],
      "consistent-return": ["warn", { treatUndefinedAsUnspecified: true }],
      "default-case": ["error"],
      "dot-notation": ["warn"],
      eqeqeq: ["error", "smart"],
      "no-eval": ["error"],
      "no-implied-eval": ["error"],
      "no-loop-func": ["warn"],
      "no-unused-expressions": ["warn", { allowShortCircuit: true, allowTernary: true }],
      // "no-unused-vars": ["error", { args: "none" }],
  
      // stylistic
      camelcase: ["warn", { properties: "never" }],
      "comma-style": ["warn", "last"],
      "computed-property-spacing": ["warn", "never"],
      "func-call-spacing": ["warn", "never"],
      indent: ["warn", 2, { VariableDeclarator: { var: 2, let: 2, const: 3 } }],
      "linebreak-style": ["warn", "unix"],
      "no-multiple-empty-lines": ["warn", { max: 2, maxEOF: 1 }],
      "no-tabs": ["warn"],
      "no-trailing-spaces": ["warn"],
      "no-unneeded-ternary": ["warn"],
      quotes: ["warn", "double"],
      semi: ["error"],
      "@typescript-eslint/no-empty-interface": "off",
      "@typescript-eslint/no-empty-function": "off",
      "@typescript-eslint/ban-ts-comment": "off",
      "@typescript-eslint/no-explicit-any": "off",
      "@typescript-eslint/no-unused-vars": "off",
      "consistent-return": "off",
      "no-console": "warn",
      "@typescript-eslint/no-non-null-assertion": "off",
    }
  };
  